function formatDate (now) {
  var year = now.getFullYear(),
      month = now.getMonth() + 1,
      date = now.getDate(),
      format =  (num) => {
        if (num < 10) {
          return '0' + num;
        }
        return num
      };
  return format(year) + '-' + format(month) + '-' + format(date)
}

export default formatDate